﻿Public Class FES_Gestion
    Friend Property _Permisos As Integer

    Private Sub BtnArticulos_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnArticulos.Click
        Try
            Dim Articulos As New FES_Articulos

            Articulos.ShowDialog()
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

    Private Sub FES_Gestion_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Try
            Select Case _Permisos
                Case 1 ''Normal
                    BtnArticulos.Visible = False
                    BtnGestionSobre.Visible = False
                Case 2 ''Botellero
                    BtnGestionSobre.Visible = False
                Case 3 ''Administrador
                    BtnArticulos.Visible = False
            End Select
        Catch ex As Exception

        End Try
    End Sub


    Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
        Try
            Me.Close()
        Catch ex As Exception

        End Try
    End Sub

    Public Sub New(ByVal Permisos As String)

        ' Llamada necesaria para el diseñador.
        InitializeComponent()

        _Permisos = Permisos
        ' Agregue cualquier inicialización después de la llamada a InitializeComponent().

    End Sub

    Private Sub BtnGestionSobre_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGestionSobre.Click
        Try
            Dim Sobres As New FES_GestionSobre(_Permisos)

            Sobres.ShowDialog()
        Catch ex As Exception

        End Try
    End Sub
End Class